package com.loan.web.page;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * FBF
 * 用户页面接口
 * @author FBF
 */
@Controller
@RequestMapping("/page/user")
public class UserControllerPage {
    /**
     * FBF
     * 用户个人中心
     * @return
     */
    @RequestMapping("detail")
    public String detail(HttpSession session){
        if(session.getAttribute("username")==null){
            return "index";
        }
        return "user_detail";
    }
    /**
     * FBF
     * 用户退出
     * @return
     */
    @RequestMapping("loginOut")
    public String loginOut(HttpSession session){
        session.removeAttribute("username");
        return "/index";
    }
}
